<?php

namespace App\Containers\AppSection\Pledge\Observers\Properties;

use App\Containers\AppSection\Pledge\Models\Properties\Building;
use App\Ship\Parents\Observers\Observer;

class BuildingObserver extends Observer
{
    public function deleted(Building $model)
    {
        if (!empty($model->property)) {
            $model->property->delete();
        }
    }
}
